﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ActionReporter
{
    public delegate void HandleAction(ActionEventArgs args);

    /// <summary>
    /// The Action Reporter Component simply reports all of Lisa's relevant actions back to any listening components.
    /// Other components may register for various events of the ActionReport Component and will get informed of
    /// the relevant actions Lisa is performing.
    /// </summary>
    public interface IActionReporter
    {
        #region Events
        /// <summary>
        /// Fired when Lisa changed state.
        /// </summary>
        event HandleAction StateChanged;

        /// <summary>
        /// Fired when Lisa executed a command.
        /// </summary>
        event HandleAction CommandExecuted;

        /// <summary>
        /// Fires event when Lisa is asking for the user's permission
        /// </summary>
        event HandleAction UserPermissionRequired;

        /// <summary>
        /// Fires event when Lisa needs to display some system info.
        /// </summary>
        event HandleAction InfoUpdate;
        #endregion

        #region Methods
        /// <summary>
        /// Reports a State change and allows listening components to find out about the state change.
        /// </summary>
        /// <param name="oldState">The old state.</param>
        /// <param name="newState">The new state to which Lisa is switching.</param>
        void reportStateChange(String oldState, String newState);

        /// <summary>
        /// Reports the execution of a command.
        /// </summary>
        /// <param name="command">The command that's being executed.</param>
        void reportCommandExecution(String command);

        /// <summary>
        /// Reports the requirement of the user's permission.
        /// </summary>
        /// <param name="information">Additional information about why the user's permission is required.</param>
        void reportUserPermissionRequired(String information);

        /// <summary>
        /// Reports general system information.
        /// </summary>
        /// <param name="information"></param>
        void reportSystemInfo(String information);
        #endregion
    }
}
